+ -1*viol_violunaccept # NEW
+ -1*viol_notit4tat # NEW
# covariances
method ~~ 0*consp + 0*viol
'
m_conspviol_method <- cfa(m_method, mt)
summary(m_conspviol_method, fit.measures = T, standardized = T)
# residuals(m_conspviol_method, type = "standardized")
# modindices(m_conspviol_method, minimum.value = 10, sort = T)
# store correlations
ests_conspviol_nomethod <- standardizedSolution(m_conspviol)
ests_conspviol_method <- standardizedSolution(m_conspviol_method)
ests_conspviol <- rbind(subset(ests_conspviol_nomethod, op == "~~" & lhs == "viol" & rhs == "consp", select = c("lhs", "rhs", "est.std", "se", "pvalue")),
subset(ests_conspviol_method, op == "~~" & lhs == "viol" & rhs == "consp", select = c("lhs", "rhs", "est.std", "se", "pvalue")))
ests_conspviol$model <- c("No Method", "Method")
# store loadings
load_nomethod <- subset(ests_conspviol_nomethod, op == "=~", select = c("lhs", "rhs", "est.std", "se"))
load_method <- subset(ests_conspviol_method, op == "=~" & lhs != "method", select = c("lhs", "rhs", "est.std", "se"))
loadings_conspviol <- rbind(load_nomethod, load_method)
loadings_conspviol$model <- c(rep("No Method", nrow(load_nomethod)),
rep("Method", nrow(load_nomethod)))
loadings_conspviol$var <- "conspviol"
# store error variance
p <- parameterestimates(m_conspviol_method)
m_var_conspviol <- p$est[which(p$lhs == "method" & p$rhs == "method")]
# * Violence-RR -------------------------------------------------------------
m <- '
viol =~ viol_threatpols
+ viol_bricks
+ viol_stopbadgovt
+ viol_bullets
+ viol_noviol # rev here down
+ viol_nonviolprot # NEW
+ viol_violunaccept # NEW
+ viol_notit4tat # NEW
rr =~ rr_specfavr
+ rr_thard
+ rr_pdisc
+ rr_dless
# error variances (content similarities)
rr_thard ~~ rr_specfavr
'
m_rrviol <- cfa(m, mt)
summary(m_rrviol, fit.measures = T, standardized = T)
m_method <- '
# substantive
viol =~ viol_threatpols
+ viol_bricks
+ viol_stopbadgovt
+ viol_bullets
+ viol_noviol # rev here down
+ viol_nonviolprot # NEW
+ viol_violunaccept # NEW
+ viol_notit4tat # NEW
rr =~ rr_specfavr
+ rr_thard
+ rr_pdisc
+ rr_dless
# method
method =~ rr_specfavr
+ 1*rr_thard
+ -1*rr_pdisc
+ -1*rr_dless
+ 1*viol_threatpols
+ 1*viol_bricks
+ 1*viol_stopbadgovt
+ 1*viol_bullets
+ -1*viol_noviol # rev here down
+ -1*viol_nonviolprot # NEW
+ -1*viol_violunaccept # NEW
+ -1*viol_notit4tat # NEW
# error variances (content similarities)
rr_thard ~~ rr_specfavr
# covariances
method ~~ 0*rr + 0*viol
'
m_rrviol_method <- cfa(m_method, mt)
summary(m_rrviol_method, fit.measures = T, standardized = T)
# residuals(m_rrviol_method, type = "standardized")
# modindices(m_rrviol_method, minimum.value = 10, sort = T)
# store correlations
ests_rrviol_nomethod <- standardizedSolution(m_rrviol)
ests_rrviol_method <- standardizedSolution(m_rrviol_method)
ests_rrviol <- rbind(subset(ests_rrviol_nomethod, op == "~~" & lhs == "viol" & rhs == "rr", select = c("lhs", "rhs", "est.std", "se", "pvalue")),
subset(ests_rrviol_method, op == "~~" & lhs == "viol" & rhs == "rr", select = c("lhs", "rhs", "est.std", "se", "pvalue")))
ests_rrviol$model <- c("No Method", "Method")
# store loadings
load_nomethod <- subset(ests_rrviol_nomethod, op == "=~", select = c("lhs", "rhs", "est.std", "se"))
load_method <- subset(ests_rrviol_method, op == "=~" & lhs != "method", select = c("lhs", "rhs", "est.std", "se"))
loadings_rrviol <- rbind(load_nomethod, load_method)
loadings_rrviol$model <- c(rep("No Method", nrow(load_nomethod)),
rep("Method", nrow(load_nomethod)))
loadings_rrviol$var <- "rrviol"
# store error variance
p <- parameterestimates(m_rrviol_method)
m_var_rrviol <- p$est[which(p$lhs == "method" & p$rhs == "method")]
# * Violence-HS -------------------------------------------------------------
m <- '
viol =~ viol_threatpols
+ viol_bricks
+ viol_stopbadgovt
+ viol_bullets
+ viol_noviol # rev here down
+ viol_nonviolprot # NEW
+ viol_violunaccept # NEW
+ viol_notit4tat # NEW
hs =~ hs_control
+ hs_exaggerate
+ hs_leash
+ hs_reasonable
+ hs_feministpower
+ hs_fewwomen
# error variances (content similarities)
hs_reasonable ~~ hs_feministpower
'
m_hsviol <- cfa(m, mt)
summary(m_hsviol, fit.measures = T, standardized = T)
m_method <- '
# substantive
viol =~ viol_threatpols
+ viol_bricks
+ viol_stopbadgovt
+ viol_bullets
+ viol_noviol # rev here down
+ viol_nonviolprot # NEW
+ viol_violunaccept # NEW
+ viol_notit4tat # NEW
hs =~ hs_control
+ hs_exaggerate
+ hs_leash
+ hs_reasonable
+ hs_feministpower
+ hs_fewwomen
# method
method =~ hs_control
+ 1*hs_exaggerate
+ 1*hs_leash
+ -1*hs_reasonable
+ -1*hs_feministpower
+ -1*hs_fewwomen
+ 1*viol_threatpols
+ 1*viol_bricks
+ 1*viol_stopbadgovt
+ 1*viol_bullets
+ -1*viol_noviol # rev here down
+ -1*viol_nonviolprot # NEW
+ -1*viol_violunaccept # NEW
+ -1*viol_notit4tat # NEW
# error variances (content similarities)
hs_reasonable ~~ hs_feministpower
# covariances
method ~~ 0*hs + 0*viol
'
m_hsviol_method <- cfa(m_method, mt)
summary(m_hsviol_method, fit.measures = T, standardized = T)
# residuals(m_hsviol_method, type = "standardized")
# modindices(m_hsviol_method, minimum.value = 10, sort = T)
# store correlations
ests_hsviol_nomethod <- standardizedSolution(m_hsviol)
ests_hsviol_method <- standardizedSolution(m_hsviol_method)
ests_hsviol <- rbind(subset(ests_hsviol_nomethod, op == "~~" & lhs == "viol" & rhs == "hs", select = c("lhs", "rhs", "est.std", "se", "pvalue")),
subset(ests_hsviol_method, op == "~~" & lhs == "viol" & rhs == "hs", select = c("lhs", "rhs", "est.std", "se", "pvalue")))
ests_hsviol$model <- c("No Method", "Method")
# store loadings
load_nomethod <- subset(ests_hsviol_nomethod, op == "=~", select = c("lhs", "rhs", "est.std", "se"))
load_method <- subset(ests_hsviol_method, op == "=~" & lhs != "method", select = c("lhs", "rhs", "est.std", "se"))
loadings_hsviol <- rbind(load_nomethod, load_method)
loadings_hsviol$model <- c(rep("No Method", nrow(load_nomethod)),
rep("Method", nrow(load_nomethod)))
loadings_hsviol$var <- "hsviol"
# store error variance
p <- parameterestimates(m_hsviol_method)
m_var_hsviol <- p$est[which(p$lhs == "method" & p$rhs == "method")]
# * Conspiracy-RR -------------------------------------------------------------
m <- '
consp =~ consp_plots
+ consp_fewppl
+ consp_dkrun
+ consp_wars
+ consp_schoolexps # NEW, rev here down
+ consp_complex # NEW
+ consp_US # NEW
rr =~ rr_specfavr
+ rr_thard
+ rr_pdisc
+ rr_dless
# error variances (content similarities)
rr_thard ~~ rr_specfavr
'
m_consprr <- cfa(m, mt)
summary(m_consprr, fit.measures = T, standardized = T)
m_method <- '
# substantive
consp =~ consp_plots
+ consp_fewppl
+ consp_dkrun
+ consp_wars
+ consp_schoolexps # NEW, rev here down
+ consp_complex # NEW
+ consp_US # NEW
rr =~ rr_specfavr
+ rr_thard
+ rr_pdisc
+ rr_dless
# method
method =~ consp_plots
+ 1*consp_fewppl
+ 1*consp_dkrun
+ 1*consp_wars
+ -1*consp_schoolexps # NEW, rev here down
+ -1*consp_complex # NEW
+ -1*consp_US # NEW
+ 1*rr_specfavr
+ 1*rr_thard
+ -1*rr_pdisc
+ -1*rr_dless
# error variances (content similarities)
rr_thard ~~ rr_specfavr
# covariances
method ~~ 0*consp + 0*rr
'
m_consprr_method <- cfa(m_method, mt)
summary(m_consprr_method, fit.measures = T, standardized = T)
# residuals(m_consprr_method, type = "standardized")
# modindices(m_consprr_method, minimum.value = 10, sort = T)
# store correlations
ests_consprr_nomethod <- standardizedSolution(m_consprr)
ests_consprr_method <- standardizedSolution(m_consprr_method)
ests_consprr <- rbind(subset(ests_consprr_nomethod, op == "~~" & lhs == "consp" & rhs == "rr", select = c("lhs", "rhs", "est.std", "se", "pvalue")),
subset(ests_consprr_method, op == "~~" & lhs == "consp" & rhs == "rr", select = c("lhs", "rhs", "est.std", "se", "pvalue")))
ests_consprr$model <- c("No Method", "Method")
# store loadings
load_nomethod <- subset(ests_consprr_nomethod, op == "=~", select = c("lhs", "rhs", "est.std", "se"))
load_method <- subset(ests_consprr_method, op == "=~" & lhs != "method", select = c("lhs", "rhs", "est.std", "se"))
loadings_consprr <- rbind(load_nomethod, load_method)
loadings_consprr$model <- c(rep("No Method", nrow(load_nomethod)),
rep("Method", nrow(load_nomethod)))
loadings_consprr$var <- "consprr"
# store error variance
p <- parameterestimates(m_consprr_method)
m_var_consprr <- p$est[which(p$lhs == "method" & p$rhs == "method")]
# * Conspiracy-HS -------------------------------------------------------------
m <- '
consp =~ consp_plots
+ consp_fewppl
+ consp_dkrun
+ consp_wars
+ consp_schoolexps # NEW, rev here down
+ consp_complex # NEW
+ consp_US # NEW
hs =~ hs_control
+ hs_exaggerate
+ hs_leash
+ hs_reasonable
+ hs_feministpower
+ hs_fewwomen
# error variances (content similarities)
hs_reasonable ~~ hs_feministpower
'
m_consphs <- cfa(m, mt)
summary(m_consphs, fit.measures = T, standardized = T)
m_method <- '
# substantive
consp =~ consp_plots
+ consp_fewppl
+ consp_dkrun
+ consp_wars
+ consp_schoolexps # NEW, rev here down
+ consp_complex # NEW
+ consp_US # NEW
hs =~ hs_control
+ hs_exaggerate
+ hs_leash
+ hs_reasonable
+ hs_feministpower
+ hs_fewwomen
# method
method =~ consp_plots
+ 1*consp_fewppl
+ 1*consp_dkrun
+ 1*consp_wars
+ -1*consp_schoolexps # NEW, rev here down
+ -1*consp_complex # NEW
+ -1*consp_US # NEW
+ 1*hs_control
+ 1*hs_exaggerate
+ 1*hs_leash
+ -1*hs_reasonable
+ -1*hs_feministpower
+ -1*hs_fewwomen
# error variances (content similarities)
hs_reasonable ~~ hs_feministpower
# covariances
method ~~ 0*consp + 0*hs
'
m_consphs_method <- cfa(m_method, mt)
summary(m_consphs_method, fit.measures = T, standardized = T)
# residuals(m_consphs_method, type = "standardized")
# modindices(m_consphs_method, minimum.value = 10, sort = T)
# store cohselations
ests_consphs_nomethod <- standardizedSolution(m_consphs)
ests_consphs_method <- standardizedSolution(m_consphs_method)
ests_consphs <- rbind(subset(ests_consphs_nomethod, op == "~~" & lhs == "consp" & rhs == "hs", select = c("lhs", "rhs", "est.std", "se", "pvalue")),
subset(ests_consphs_method, op == "~~" & lhs == "consp" & rhs == "hs", select = c("lhs", "rhs", "est.std", "se", "pvalue")))
ests_consphs$model <- c("No Method", "Method")
# store loadings
load_nomethod <- subset(ests_consphs_nomethod, op == "=~", select = c("lhs", "rhs", "est.std", "se"))
load_method <- subset(ests_consphs_method, op == "=~" & lhs != "method", select = c("lhs", "rhs", "est.std", "se"))
loadings_consphs <- rbind(load_nomethod, load_method)
loadings_consphs$model <- c(rep("No Method", nrow(load_nomethod)),
rep("Method", nrow(load_nomethod)))
loadings_consphs$var <- "consphs"
# store ehsor variance
p <- parameterestimates(m_consphs_method)
m_var_consphs <- p$est[which(p$lhs == "method" & p$rhs == "method")]
# * RR-HS -------------------------------------------------------------
m <- '
rr =~ rr_specfavr
+ rr_thard
+ rr_pdisc
+ rr_dless
hs =~ hs_control
+ hs_exaggerate
+ hs_leash
+ hs_reasonable
+ hs_feministpower
+ hs_fewwomen
# error variances (content similarities)
hs_reasonable ~~ hs_feministpower
rr_thard ~~ rr_specfavr
'
m_hsrr <- cfa(m, mt)
summary(m_hsrr, fit.measures = T, standardized = T)
m_method <- '
# substantive
rr=~ rr_specfavr
+ rr_thard
+ rr_pdisc
+ rr_dless
hs =~ hs_control
+ hs_exaggerate
+ hs_leash
+ hs_reasonable
+ hs_feministpower
+ hs_fewwomen
# method
method =~ rr_specfavr
+ 1*rr_thard
+ -1*rr_pdisc
+ -1*rr_dless
+ 1*hs_control
+ 1*hs_exaggerate
+ 1*hs_leash
+ -1*hs_reasonable
+ -1*hs_feministpower
+ -1*hs_fewwomen
# error variances (content similarities)
hs_reasonable ~~ hs_feministpower
rr_thard ~~ rr_specfavr
# covariances
method ~~ 0*hs + 0*rr
'
m_hsrr_method <- cfa(m_method, mt)
summary(m_hsrr_method, fit.measures = T, standardized = T)
# residuals(m_hsrr_method, type = "standardized")
# modindices(m_hsrr_method, minimum.value = 10, sort = T)
# store correlations
ests_hsrr_nomethod <- standardizedSolution(m_hsrr)
ests_hsrr_method <- standardizedSolution(m_hsrr_method)
ests_hsrr <- rbind(subset(ests_hsrr_nomethod, op == "~~" & lhs == "rr" & rhs == "hs", select = c("lhs", "rhs", "est.std", "se", "pvalue")),
subset(ests_hsrr_method, op == "~~" & lhs == "rr" & rhs == "hs", select = c("lhs", "rhs", "est.std", "se", "pvalue")))
ests_hsrr$model <- c("No Method", "Method")
# store loadings
load_nomethod <- subset(ests_hsrr_nomethod, op == "=~", select = c("lhs", "rhs", "est.std", "se"))
load_method <- subset(ests_hsrr_method, op == "=~" & lhs != "method", select = c("lhs", "rhs", "est.std", "se"))
loadings_hsrr <- rbind(load_nomethod, load_method)
loadings_hsrr$model <- c(rep("No Method", nrow(load_nomethod)),
rep("Method", nrow(load_nomethod)))
loadings_hsrr$var <- "hsrr"
# store error variance
p <- parameterestimates(m_hsrr_method)
m_var_hsrr <- p$est[which(p$lhs == "method" & p$rhs == "method")]
# Combine -----------------------------------------------------------------
# correlations
ests <- rbind(ests_consphs, ests_consprr, ests_conspviol, ests_hsrr, ests_hsviol, ests_nfcconsp,
ests_nfchs, ests_nfcPop, ests_nfcrr, ests_nfcviol, ests_popconsp, ests_pophs,
ests_poprr, ests_popviol, ests_rrviol)
# method variance
error_vars <- c(m_var_consphs, m_var_consprr, m_var_conspviol, m_var_hsrr, m_var_hsviol,
m_var_nfcconsp, m_var_nfchs, m_var_nfcPop, m_var_nfcrr, m_var_nfcviol,
m_var_popconsp, m_var_pophs, m_var_poprr, m_var_popviol, m_var_rrviol)
x <- paste("", round(error_vars, 3))
ests_wide_s3 <- reshape(ests, idvar = c("lhs", "rhs"), timevar = "model", direction = "wide")
ests_wide_s3$study <- "Study 3"
# combine
# ests$lhs <- c("Anti-Democratic Attitudes (PW)", "Anti-Democratic Attitudes (PW)",
#               "Anti-Democratic Attitudes (PW)", "Anti-Democratic Attitudes (PW)",
#               "Populism (B)", "Populism (B)",
#               "Populism (B)", "Populism (B)",
#               "Populism (B)", "Populism (B)",
#               "Conspiracy (PW)", "Conspiracy (PW)")
# ests$rhs <- c("Conspiracy (PW)", "Conspiracy (PW)",
#               "Hostile Sexism (B)", "Hostile Sexism (B)",
#               "Anti-Democratic Attitudes (PW)", "Anti-Democratic Attitudes (PW)",
#               "Conspiracy (PW)", "Conspiracy (PW)",
#               "Hostile Sexism (B)", "Hostile Sexism (B)",
#               "Hostile Sexism (B)", "Hostile Sexism (B)")
ests$method_variance <- unlist(strsplit(x, " "))
names(ests) <- c("Var1", "Correlation", "SE", "p_value", "Model", "Var2", "Method Variance")
ests$corr <- paste(ests$Var1, ests$Var2, sep = " with ")
ests_2F <- subset(ests, select = c("corr",  "Correlation", "SE", "p_value", "Model", "Method Variance"))
# Packages ----------------------------------------------------------------
library(lavaan)
# Load Data ----------------------------------------------------------------
source("./main/study4_cleaning.R")
bov <- subset(bov, subset = grid_check == 1 & open_views_pass == 0 & opencheck_pass == 0)
library(ggplot2)
library(patchwork)
library(MVN)
library(haven)
library(ggplot2)
library(patchwork)
# Study Models -----
source("./main/study2_sems.R")
source("./main/study3_sems.R")
source("./main/study4_sems.R")
# Combine Studies ---------------------------------------------------------
ests_wide <- rbind(ests_wide_s2,
ests_wide_s3,
ests_wide_s4)
ests_wide$study <- factor(ests_wide$study,
labels = c("Study 2 (Dynata)", "Study 3 (MTurk)", "Study 4 (Bovitz)"))
# Summary Stats -----------------------------------------------------------
## Average Correlation Differences
summary(abs(ests_wide$`est.std.No Method` -
ests_wide$est.std.Method))
sd(abs(ests_wide$`est.std.No Method` -
ests_wide$est.std.Method))
# S2
mean(abs(ests_wide_s2$`est.std.No Method`-ests_wide_s2$est.std.Method))
# S3
mean(abs(ests_wide_s3$`est.std.No Method`-ests_wide_s3$est.std.Method))
# S4
mean(abs(ests_wide_s4$`est.std.No Method`-ests_wide_s4$est.std.Method))
# Proportion of corrections increasing correlation
prop.table(table(ests_wide$`est.std.No Method` <
ests_wide$est.std.Method))
# S2
prop.table(table(ests_wide_s2$`est.std.No Method` < ests_wide_s2$est.std.Method))
# S3
prop.table(table(ests_wide_s3$`est.std.No Method` < ests_wide_s3$est.std.Method))
# S4
prop.table(table(ests_wide_s4$`est.std.No Method` < ests_wide_s4$est.std.Method))
## FN 16
summary(abs(ests_wide$`est.std.No Method`[c(5, 7:42)] -
ests_wide$est.std.Method[c(5, 7:42)]))
sd(abs(ests_wide$`est.std.No Method`[c(5, 7:42)] -
ests_wide$est.std.Method[c(5, 7:42)]))
# Proportion of corrections increasing correlation
prop.table(table(ests_wide$`est.std.No Method`[c(5, 7:42)] <
ests_wide$est.std.Method[c(5, 7:42)]))
# Correlation-Specific Changes --------------------------------------------------
ests_wide$corr_diff <- abs(ests_wide$`est.std.No Method` - ests_wide$est.std.Method)
ests_wide[order(ests_wide$corr_diff, decreasing = T),
c("study","lhs", "rhs", "est.std.No Method", "est.std.Method", "corr_diff", "pvalue.No Method", "pvalue.Method")]
cd_hs <- subset(ests_wide, rhs == "hs" | lhs == "hs")
cd_rr <- subset(ests_wide, rhs == "rr" | lhs == "rr")
cd_pop <- subset(ests_wide, rhs == "pop" | lhs == "pop")
cd_nfc <- subset(ests_wide, rhs == "nfc" | lhs == "nfc")
cd_viol <- subset(ests_wide, rhs == "viol" | lhs == "viol")
cd_consp <- subset(ests_wide, rhs == "consp" | lhs == "consp")
cd_antdem <- subset(ests_wide, rhs == "antidem" | lhs == "antidem")
mean(cd_hs$corr_diff[which(cd_hs$study != "Study 2")]) # .07, .06 w/o S2
mean(cd_rr$corr_diff[which(cd_rr$study != "Study 2")]) # .04, .04
mean(cd_pop$corr_diff[which(cd_pop$study != "Study 2")]) # .08, .05
mean(cd_nfc$corr_diff[which(cd_nfc$study != "Study 2")]) # .04, .04
mean(cd_viol$corr_diff[which(cd_viol$study != "Study 2")]) # .02, .02
mean(cd_consp$corr_diff[which(cd_consp$study != "Study 2")]) # .06, .04
mean(cd_antdem$corr_diff[which(cd_antdem$study != "Study 2")]) # .06, .03
# Compare to Naive Corrs --------------------------------------------------
obvar_corrs <- read.csv("../Data/naive_corr_labeled.csv")
obvar_corrs$alignrev <- factor(obvar_corrs$alignrev,
levels = c(0, 1),
labels = c("PW-PW", "NW-NW"))
obvar_corrs <- obvar_corrs[which(duplicated(obvar_corrs) == FALSE), ]
obvar_corrs$study <- paste("Study", obvar_corrs$study)
ests_wide$pair <- paste(ests_wide$lhs, ests_wide$rhs, sep = "-")
ests_wide$study2 <- NA
ests_wide$study2[which(ests_wide$study == "Study 2 (Dynata)")] <- "Study 2"
ests_wide$study2[which(ests_wide$study == "Study 3 (MTurk)")] <- "Study 3"
ests_wide$study2[which(ests_wide$study == "Study 4 (Bovitz)")] <- "Study 4"
corr_compare <- merge(ests_wide, obvar_corrs, by.x = c("study2", "pair"), by.y = c("study", "pair"))
corr_compare$corr_diff <- corr_compare$est.std.Method-corr_compare$cor1
# Descriptives ------------------------------------------------------------
# Descriptives: All Scales
# correlations that increase
prop.table(table(corr_compare$corr_diff > 0))
# mean, range, SD
summary(abs(corr_compare$corr_diff))
sd(abs(corr_compare$corr_diff))
# Descriptives: By Alignment
# correlations that increase
prop.table(table(corr_compare$corr_diff[which(corr_compare$alignrev == "PW-PW")] > 0))
prop.table(table(corr_compare$corr_diff[which(corr_compare$alignrev == "NW-NW")] > 0))
# mean, range, SD
summary(abs(corr_compare$corr_diff[which(corr_compare$alignrev == "PW-PW")]))
sd(abs(corr_compare$corr_diff[which(corr_compare$alignrev == "PW-PW")]))
summary(abs(corr_compare$corr_diff[which(corr_compare$alignrev == "NW-NW")]))
sd(abs(corr_compare$corr_diff[which(corr_compare$alignrev == "NW-NW")]))
# Export to Stata for Plot ------------------------------------------------
# write.dta(corr_compare, file = "../data/mainplot.dta")
sessionInfo()
